
#ifndef __tools_object_transformH__
#define __tools_object_transformH__

#include "tools_object_selection.h"

namespace WtfEngine {
	typedef ObjectSelection<WorldObject> ObjectSelectionTool;

	class ObjectTool: public IDynamic, public WorldObject {
	protected:
		ObjectSelectionTool::tRef mrSelection;
		int	miDragAxis;

	public:
		ObjectTool(const ObjectSelectionTool::tRef&);

		virtual void Init();
		virtual void Destroy();

		virtual void Update();

		virtual void OnMouseDown();
		virtual void OnMouseMove();
		virtual void OnMouseUp();

		GC_AUTOSIZE(ObjectTool);
	};


	/**
	 * Move tool allows selected objects to be moved.
	 **/
	class ObjectMoveTool: public ObjectTool {
	public:
		ObjectMoveTool(const ObjectSelectionTool::tRef&);

		void OnMouseMove();

		GC_AUTOSIZE(ObjectMoveTool);
	};


	/**
	 * The scale tool listens for object selections, and adds a scale
	 * widget to selected objects. When the scale widget is dragged,
	 * the objects are resized.
	 **/
	class ObjectScaleTool: public ObjectTool {
	public:
		ObjectScaleTool(const ObjectSelectionTool::tRef&);

		void OnMouseMove();

		GC_AUTOSIZE(ObjectScaleTool);
	};
};

#endif
